it makes a lot of sense to keep dispatch and state in separate contexts if there are quite a lot of components in your app that largely only use dispatch and hence they will not re-render if the state changes. Even if we memorize contextValue with the useMemo hook, contextValue will still be re-evaluated every time we update the state's value, causing all components depending on the context to rerender, even some of them only depend on dispatch only.
Components consuming only won't re-render when the state changes, thus optimizing performance.
StateContext provides the state to components that need it.
DispatchContext provides the dispatch function to components that need to trigger actions.